<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /*显示和隐藏的效果*/
        
        .xxx-enter-active,
        .xxx-leave-active {
            transition: opacity 1s;
        }
        /*隐藏时的样式*/
        
        .xxx-enter,
        .xxx-leave-to {
            opacity: 0;
        }
        /*显示过度效果*/
        
        .yyy-enter-active {
            transition: all 1s;
        }
        /*隐藏效果*/
        
        .yyy-leave-active {
            transition: all 3s;
        }
        /*隐藏时的样式*/
        
        .yyy-enter,
        .yyy-leave-to {
            opacity: 0;
            transform: translateX(20px);
        }
    </style>
</head>

<body>
    <div id="wzc1">
        <button @click="isShow=!isShow">test</button>
        <transition name="xxx">
            <p v-show="isShow" class="xxx-enter-to">hello</p>
        </transition>
    </div>
    <div id="wzc2">
        <button @click="isShow=!isShow">test</button>
        <transition name="yyy">
            <p v-show="isShow" class="yyy-enter-to">hello</p>
        </transition>
    </div>
    <script src="./vue.js"></script>
    <script>
        new Vue({
            el: "#wzc1",
            data() {
                return {
                    isShow: true
                }
            }
        });
        new Vue({
            el: "#wzc2",
            data() {
                return {
                    isShow: true
                }
            }
        })
    </script>
</body>

</html>